Environment variables

Purpose of this building block

Including the Environment variables building block in your Ultradox file make your environment variables appear in the auto-completion in other building blocks and within the Ultradox Template Editor.

The current values of the environment variables will also be displayed in the console.

0 variables
6 variables
${now}
${locale}
${timezone}
${currency}
${currentUser}
${ultradocOwner}

Possible use cases

  • Show the current date/time in a generated document
  • Send notifications to the owner of the Ultradox file
  • Send an email to the current user of your app
  • Search for files matching the locale (language) of the current user

Configuration

No configuration required

Useful combinations

Find documents matching the user's language

fileId
file
file
EMAIL

Access the environment variables by including the Environment variables building block in your Ultradox file.

Use the locale variable in the Find file building block to look-up files in the users' language.

Download the file that was found from your Google Drive and attach it to an email.

Copy the Find Documents Matching User Language app to see this building block in action

Set environment variables to change the default currency, language or timezone

EUR
currency
GMT+1
timezone
currency
100 €
timezone
23:21:00 GMT+1

Use a From building block to define default values for currency and timezone.

Using those environment variables in your flow you the original system values are overwritten with the specified default values. You can thereby manually set the language, currency, timezone in the further processing of your Ultradox flow.

When using the currency or time formats without explicitly specifying the currency code or timezone in the the Comment building block, the new default currency or timezone will be used.

Copy the Overwrite Environment Variables app to see this building block in action

Further information

The following environment variables will be available:

Variable

Example Output

${now}

Mon Apr 25 09:53:30 UTC 2016

${locale}

de_CH

${timezone}

UTC

${currency}

USD

${ultradocOwner}

[email protected]

${currentUser.email}

[email protected]

${currentUser.givenName}

Joe

${currentUser.familyName}

Plumber

${currentUser.displayName}

Joe Plumber

${currentUser.domain}

acme.org

${currentUser.gender}

male

${currentUser.photo}

https://joephoto.png

Questions and Feedback

If you have any comments on this guide, feel free to add them right to the Google document that we are using to create this site.

If you are not yet member of the Ultradox community on Google+, please join now to get updates from our end or to provide feedback, bug reports or discuss with other users.

Last Updated:

Share on Google+Share on FacebookShare on TwitterShare on LinkedIn